/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ar.com.wholeconsulting.pacc.gui.utils.treetable.modelos;

import ar.com.wholeconsulting.pacc.gui.utils.treetable.PACCAbstractTreeTableModel;
import ar.com.wholeconsulting.pacc.gui.utils.treetable.TreeTableNode;

/**
 *
 * @author pable
 */
public class ModelosTreeTableModel extends PACCAbstractTreeTableModel {

    public ModelosTreeTableModel() {
        super(new String []{"Fabricante","Descripcion","Cantidad de Modelos"});
    }


    @Override
	public Object getValueAt(Object node, int column) {
		//System.out.println("getValueAt: " + node + ", " + column);
		TreeTableNode treenode = (TreeTableNode) node;
		switch (column) {
		case 0:
			return treenode.getName();
		case 1:
			return treenode.getDescription();
		case 2:
			return treenode.getChildren().size();
		default:
			return "Unknown";
		}
	}

}
